Imports System.Math

Module modCommon

    Public Function XYDistance(ByVal X1, ByVal X2, ByVal Y1, ByVal Y2) As Integer
        'returns the distance between two 2d coordinates
        XYDistance = Int(Abs(Math.Sqrt(((X1 - X2) * (X1 - X2)) + ((Y1 - Y2) * (Y1 - Y2)))))

    End Function



End Module
